﻿using System.Windows;
using System.Windows.Controls;

namespace ThumbExample.Views
{
    /// <summary>
    /// Interaction logic for ThumbPage
    /// </summary>
    public partial class ThumbPage : UserControl
    {
        public ThumbPage()
        {
            InitializeComponent();
        }

        private void Thumb_DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
        {
            UIElement thumb = e.Source as UIElement;
            Canvas.SetLeft(thumb, Canvas.GetLeft(thumb) + e.HorizontalChange);
            Canvas.SetTop(thumb, Canvas.GetTop(thumb) + e.VerticalChange);
        }
        private void Thumb_DragStarted(object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e)
        {
            thumbGift.BorderThickness = new Thickness(1);
        }

        private void Thumb_DragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e)
        {
            thumbGift.BorderThickness = new Thickness(0);
        }
    }
}
